const {list,urls}=require('./mock')
module.exports=app=>{
    app.get('/api/list',(req,res)=>{
        res.send({
            list,
            urls
        })
    })
    app.get('/api/id',(req,res)=>{
        const {id}=req.query
        const item=list.find(v=>v.id===id)
        res.send({
            item
        })
    })
}